package com.atguigu.lease.common.context;

public class LoginUserContext {

   private static ThreadLocal<LoginUser> context = new ThreadLocal<>();

   public static void setContext(LoginUser loginUser) {
      context.set(loginUser);
   }

   public static LoginUser getContext() {
      return context.get();
   }

   public static void clearContext() {
      context.remove();
   }
}
